package com.angle.im.common.msg;

import lombok.Data;

import java.io.Serializable;

/**
 * @author zhangwei
 * 消息体公共父类
 */
@Data
public class Message<T> implements Serializable {

    private static final long serialVersionUID = 4209038997009785809L;
    /**
     * 消息体版本
     */
    private final float v = 1.0F;
    /**
     * 具体消息体
     */
    private T body;
    /**
     * 动作类型
     */
    private int action;

    public Message() {
    }

    public Message(int action, T body) {
        this.action = action;
        this.body = body;
    }

    public Message(int action) {
        this.action = action;
    }
}
